<?php
/*
 * by SONY K Wibisono
 * e-mail : sony@sonywibisono.com
 */
class class_name {
    var $id;
    
    function open(){
        global $db;
        $sql="";
        $row=$db->fetch_row($sql);
        if (!empty($row)){
            
        }
    }
    function openAll(){
        global $db;
        
    }
    function insert(){
    global $db;
    $sql="insert statement";
    $db->query($sql);
    return mysql_insert_id();
    }
    function update(){
        global $db;
        $sql="update statement";
        $db->query($sql);
    }
    function delete(){
        global $db;
        $sql="delete from [table_name] where id=".$this->id;
        $db->query($sql);
    }
}
?>
